<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Classification [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onLoad="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_deeplearning.html">Deep Learning</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<h2>分类</h2>
<p><a href="#section_list">List of Sections ↓</a></p>
<p>This chapter explains how to use classification based on deep learning,
both for the training and inference phases.
</p>
<p>Classification based on deep learning is a method, in which an image gets
a set of confidence values assigned. These confidence values
indicate how likely the image belongs to each of the distinguished classes.
Thus, if we regard only the top prediction, classification means to assign
a specific class out of a given set of classes to an image.
This is illustrated with the following schema.
</p>
<div style="text-align:center;" class="figure">
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg4588" viewBox="0 0 636.86036 141.73228" height="20mm" width="89.868075mm" customscale="0.5">
  <defs id="defs4590">
    <marker style="overflow:visible" id="marker6565-9-2" refX="0" refY="0" orient="auto">
      <path transform="matrix(-0.3,0,0,-0.3,0.69,0)" d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" style="fill:#f08b25;fill-opacity:1;fill-rule:evenodd;stroke:#f08b25;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1" id="path6563-2-1"></path>
    </marker>
  </defs>
  <metadata id="metadata4593">
    <rdf:RDF>
      <cc:Work rdf:about="">
        <dc:format>image/svg+xml</dc:format>
        <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"></dc:type>
        <dc:title></dc:title>
      </cc:Work>
    </rdf:RDF>
  </metadata>
  <g transform="translate(189.85875,-455.78178)" id="layer1">
    <g id="g4783" transform="matrix(3.5433071,0,0,3.5433071,-189.85877,455.78179)">
      <path style="opacity:1;fill:#f28d26;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.16933332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 62.397688,7.2944926 24.989931,0 0,24.9942504 -24.989931,-0.0023 z" id="path13368"></path>
      <g id="g13370" transform="translate(12.766474,35.267052)" style="opacity:1;fill:#ffffff;stroke:none">
        <path id="path13372" d="m 64.138308,-26.060437 c -0.928821,0.03491 -1.816396,0.692806 -1.803027,2.434718 0.01245,1.620235 0.02484,3.166741 0.03418,4.683676 l 0.469084,0 a 1.0201039,1.0201039 0 0 1 0.970139,-0.706106 1.0201039,1.0201039 0 0 1 1.019748,1.019748 1.0201039,1.0201039 0 0 1 -1.019748,1.0203 1.0201039,1.0201039 0 0 1 -0.956911,-0.668073 l -0.480108,0 c 0.0048,0.919047 0.0085,1.833076 0.0083,2.73954 l 0.464123,0 c 0.548618,0 0.99395,0.523027 1.02581,1.032978 l 0.01487,0.244739 c 0.01617,0.258948 0.213115,0.466879 0.474597,0.466879 l 0.08874,0 a 1.0201039,1.0201039 0 0 1 0.967385,-0.698389 1.0201039,1.0201039 0 0 1 1.020298,1.019748 1.0201039,1.0201039 0 0 1 -1.020298,1.020299 1.0201039,1.0201039 0 0 1 -0.933761,-0.6124 l 0,0.0055 c -0.613856,-0.01429 -1.130057,-0.413885 -1.201098,-1.148182 l -0.02314,-0.237022 c -0.02596,-0.268532 -0.210552,-0.497196 -0.428295,-0.497196 l -0.447585,0 c -0.0017,0.958238 -0.0094,1.920089 -0.0204,2.887265 0.659588,0.05871 1.622634,0.126163 1.676799,1.290946 l 0.01544,0.329076 c 0.016,0.344221 0.369404,0.710901 0.891867,0.718233 0.121054,-0.443171 0.52341,-0.750742 0.982817,-0.751306 0.462946,3.95e-4 0.86759,0.312466 0.985573,0.760126 l 0.01708,0 1.208814,0.0077 c 0.59241,0.0038 0.967732,0.326321 1.155898,0.766189 -0.0034,-0.05903 -0.0043,-0.118712 -0.0083,-0.177491 1.223125,-0.104988 1.961893,-0.83274 1.920985,-2.111706 -0.01578,-0.49317 0.02681,-0.975441 0.0193,-1.430404 -0.383456,0.70818 -1.116528,1.26167 -2.068712,1.348824 a 1.0201039,1.0201039 0 0 1 -0.958012,0.673034 1.0201039,1.0201039 0 0 1 -1.020301,-1.0203 1.0201039,1.0201039 0 0 1 1.020301,-1.019748 1.0201039,1.0201039 0 0 1 0.985021,0.758473 c 0.987699,-0.02924 1.818682,-1.135271 1.80082,-1.919332 -0.133592,-0.26356 -0.336267,-0.507004 -0.645473,-0.724848 0.157872,-0.08902 0.28652,-0.207512 0.392467,-0.347817 -0.0058,0.0027 -0.0095,0.0062 -0.01544,0.0088 -0.467036,-0.850462 -1.318055,-1.116301 -2.26381,-1.053876 a 1.0049738,1.0049738 0 0 1 -0.949742,0.681302 1.0049738,1.0049738 0 0 1 -1.004867,-1.004866 1.0049738,1.0049738 0 0 1 1.004867,-1.004866 1.0049738,1.0049738 0 0 1 0.971792,0.754063 c 0.786497,-0.04925 1.870677,0.145971 2.54882,1.002661 0.308009,-1.054603 0.08043,-2.633531 0.152135,-3.897092 0.0483,-0.851245 -0.600504,-1.666541 -1.710422,-1.866416 l 0.01157,0.0072 c -0.527273,0.634623 -1.176514,0.98985 -1.989337,0.971793 l 0,-0.0094 a 1.0201039,1.0201039 0 0 1 -0.964074,0.692878 1.0201039,1.0201039 0 0 1 -1.020301,-1.0203 1.0201039,1.0201039 0 0 1 1.020301,-1.019748 1.0201039,1.0201039 0 0 1 0.996598,0.806979 c 0.697131,0.08825 1.107581,-0.254082 1.46182,-0.680199 l 0.07442,-1.502066 c 0.07483,-1.517111 -1.860037,-2.303174 -2.869627,-1.721997 -0.151111,-0.749746 -1.121151,-1.337429 -2.049969,-1.302522 z m 2.388416,4.906368 a 0.41028276,0.41028276 0 0 0 -0.410106,0.410104 0.41028276,0.41028276 0 0 0 0.410106,0.410104 0.41028276,0.41028276 0 0 0 0.410653,-0.410104 0.41028276,0.41028276 0 0 0 -0.410653,-0.410104 z m 0.986124,4.480278 a 0.41028276,0.41028276 0 0 0 -0.410106,0.410655 0.41028276,0.41028276 0 0 0 0.410106,0.410105 0.41028276,0.41028276 0 0 0 0.410103,-0.410105 0.41028276,0.41028276 0 0 0 -0.410103,-0.410655 z m 0.687917,4.598789 a 0.41028276,0.41028276 0 0 0 -0.410106,0.410104 0.41028276,0.41028276 0 0 0 0.410106,0.410656 0.41028276,0.41028276 0 0 0 0.410102,-0.410656 0.41028276,0.41028276 0 0 0 -0.410102,-0.410104 z m -5.846191,0.541844 c -0.02246,1.685842 -0.05997,3.401261 -0.124023,5.2051246 -0.09289,2.616189 3.520959,3.155053 4.152305,0.48507 1.302667,0.360443 2.083186,-0.01262 2.621579,-0.9469876 0.02551,-0.05592 0.04493,-0.112522 0.0667,-0.16867 -0.221293,0.30323 -0.536465,0.5054616 -0.931553,0.5054616 l -3.467145,0 c -0.102797,0.467256 -0.516515,0.800354 -0.994944,0.800919 -0.563327,9.9e-5 -1.020103,-0.456424 -1.020298,-1.0197506 -1.07e-4,-0.563536 0.45676,-1.020406 1.020298,-1.020298 0.470552,4.23e-4 0.879766,0.322641 0.990535,0.779969 l 3.448403,0.01487 c 0.941036,0.0041 1.303319,-2.206974 -0.0072,-2.20376 l -1.223149,0.0028 c -0.145996,0.403509 -0.528901,0.672526 -0.958011,0.673034 -0.427231,-4.52e-4 -0.808923,-0.267087 -0.956358,-0.668073 l -5.65e-4,0 c -0.919356,0.002 -1.593153,-0.723139 -1.560491,-1.392921 l 0.01544,-0.313642 c 0.01222,-0.249875 -0.377748,-0.761159 -1.071537,-0.733147 z m 1.35544,4.43563 c -0.22667,-2.06e-4 -0.410558,0.183436 -0.410656,0.410105 9.8e-5,0.2266696 0.183986,0.4103086 0.410656,0.4101026 0.226452,-9.9e-5 0.410004,-0.183651 0.410102,-0.4101026 -9.8e-5,-0.226452 -0.18365,-0.410006 -0.410102,-0.410105 z" style="fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:0.09999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"></path>
        <path style="opacity:1;fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:0.09999999;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 59.906594,-26.067615 c 0.931391,0.02476 2.010238,0.709263 1.83067,2.414002 0.006,1.620271 0.01126,3.166818 0.01922,4.683762 l -0.469055,0.0054 c -0.226854,-0.419201 -0.556852,-0.699853 -0.978126,-0.695 -0.563071,0.0066 -1.014278,0.468234 -1.008054,1.031309 0.0063,0.56329 0.468024,1.014832 1.031315,1.008606 0.427404,-0.0051 0.806311,-0.276108 0.949232,-0.678941 l 0.480076,-0.0055 c 0.0057,0.919043 0.01239,1.833054 0.02294,2.739457 l -0.464091,0.0053 c -0.548584,0.0062 -1.036621,0.518093 -1.062665,1.028375 l -0.01209,0.244893 c -0.01323,0.259114 -0.159077,0.485509 -0.420542,0.488492 l -0.115805,-0.0097 c -0.10008,-0.54047 -0.555731,-0.714541 -0.948228,-0.676493 -0.563291,0.0063 -1.014835,0.468024 -1.008608,1.031316 0.0063,0.563505 0.468364,1.015132 1.031866,1.008599 0.405236,-0.0051 0.768992,-0.249691 0.926719,-0.623007 l 6.2e-5,0.0055 c 0.613655,-0.02124 1.038689,-0.410508 1.128408,-1.145568 l 0.02045,-0.237271 c 0.02291,-0.268811 0.264389,-0.515797 0.482119,-0.518279 l 0.447556,-0.0051 c 0.01272,0.958155 -0.06612,1.963145 -0.04408,2.930134 -0.610177,-0.02035 -1.648146,0.11218 -1.781011,1.223404 l -0.01168,0.329231 c -0.01206,0.34438 -0.415386,0.747533 -0.937733,0.760821 -0.126097,-0.441762 -0.5644,-0.733904 -1.023783,-0.729229 -0.462912,0.0057 -0.820684,0.300695 -0.933556,0.749669 l 0.0046,0.01102 -0.970564,0.03231 c -0.59233,0.01054 -1.094036,0.253158 -1.277175,0.695143 0.0027,-0.05906 0.0031,-0.118758 0.0063,-0.177576 -1.436868,-0.03626 -1.975286,-1.151862 -1.975544,-2.059055 0.01015,-0.493319 -0.03792,-0.975073 -0.03557,-1.430091 0.391504,0.703761 1.207362,1.256508 2.160477,1.332801 0.150587,0.401819 0.536536,0.666441 0.965623,0.662068 0.563507,-0.0063 1.015136,-0.468364 1.008602,-1.031868 -0.0066,-0.563287 -0.468573,-1.01458 -1.031861,-1.008049 -0.462232,0.0057 -0.86285,0.321527 -0.976308,0.769654 -1.078493,-0.01043 -1.883992,-1.25646 -1.792523,-2.047555 0.13058,-0.265066 0.308823,-0.402583 0.615523,-0.62394 -0.158876,-0.0872 -0.288867,-0.204231 -0.396406,-0.343319 0.0058,0.0025 0.0096,0.006 0.01553,0.0087 0.457342,-0.855779 1.408083,-1.082605 2.327433,-0.993092 0.143013,0.405176 0.527794,0.67461 0.957448,0.670431 0.51534,-0.06576 0.945831,-0.490613 0.955467,-1.021671 -0.0064,-0.55491 -0.423469,-0.994198 -0.97838,-0.987931 -0.457853,0.0058 -0.853875,0.320428 -0.963134,0.765092 -0.787006,-0.04026 -1.933821,0.15647 -2.602152,1.020836 -0.320013,-1.051024 -0.142922,-2.632444 -0.131637,-3.884283 -0.058,-0.850638 0.570642,-1.705744 1.678208,-1.918262 l -0.0115,0.0073 c 0.534474,0.628569 1.187722,0.97637 2.000287,0.949047 l -1.07e-4,-0.0094 c 0.144724,0.411814 0.535427,0.685911 0.971911,0.681843 0.563505,-0.0063 0.982669,-0.435897 1.019424,-0.9994 -0.0066,-0.563287 -0.468574,-1.014581 -1.031862,-1.008048 -0.480844,0.006 -0.892232,0.346905 -0.987331,0.81829 -0.69608,0.09619 -1.110406,-0.241438 -1.469481,-0.663489 l -0.09155,-1.501115 c -0.09212,-1.516159 1.833656,-2.324232 2.849808,-1.754604 0.326425,-0.75142 1.108664,-1.350125 2.034985,-1.32581 z m -2.33232,4.93328 c 0.226441,-0.0025 0.412075,0.178964 0.414755,0.405402 0.0025,0.226441 -0.178965,0.412074 -0.405403,0.414754 -0.226651,0.0028 -0.412619,-0.178744 -0.415302,-0.405396 -0.0025,-0.226654 0.179295,-0.41238 0.40595,-0.41476 z m -0.8971,4.469586 c 0.226656,-0.0025 0.412383,0.179295 0.414762,0.405952 0.0025,0.226442 -0.178964,0.412076 -0.405403,0.414756 -0.22644,0.0025 -0.412072,-0.178965 -0.414752,-0.405404 -0.0028,-0.22665 0.178741,-0.41262 0.405393,-0.415304 z m -0.757489,4.582066 c 0.22644,-0.0025 0.412074,0.178963 0.414755,0.405401 0.0028,0.226652 -0.178744,0.412622 -0.405397,0.415304 -0.226655,0.0025 -0.41238,-0.179297 -0.414758,-0.405953 -0.0025,-0.226439 0.178964,-0.412071 0.4054,-0.414752 z m 5.589263,5.6216276 c 0.200694,2.653125 -3.214905,3.378944 -3.760834,0.602725 -1.298475,0.375272 -1.927544,0.121439 -2.556903,-0.7837786 -0.02614,-0.05563 -0.07682,-0.115827 -0.09922,-0.171723 0.361787,0.269425 0.623822,0.3900846 0.956389,0.3838486 l 3.093177,-0.058 c 0.10811,0.466054 0.525605,0.794412 1.00401,0.789522 0.563291,-0.0063 1.014833,-0.468025 1.008605,-1.0313166 -0.0063,-0.563501 -0.425077,-0.961022 -0.988578,-0.954489 -0.470515,0.0058 -0.876029,0.321828 -0.981577,0.78039 l -3.144997,0.01091 c -1.096467,0.09967 -1.587673,-2.103673 -0.115327,-2.203699 l 1.147347,-3.11e-4 c 0.150589,0.401818 0.363386,0.655629 0.792473,0.651245 0.427196,-0.0054 0.989797,-0.254647 1.132652,-0.65729 l -0.01027,0.01082 c 0.919318,-0.0085 1.563159,-0.806189 1.522864,-1.475556 0.03457,-0.761804 0.705898,-1.090252 1.206391,-0.939687 -0.0016,1.285385 -0.175071,3.704475 -0.206197,5.0463956 z M 60.096549,-7.143288 c 0.226654,-0.0028 0.412624,0.178743 0.415306,0.405396 0.0025,0.226657 -0.179296,0.4123786 -0.405953,0.4147576 -0.22644,0.0025 -0.412072,-0.178963 -0.414752,-0.4053996 -0.0025,-0.22644 0.178964,-0.412074 0.405399,-0.414754 z" id="path13374"></path>
      </g>
      <path style="fill:#f08b25;fill-opacity:1;stroke:#f08b25;stroke-width:4.47894335;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#marker6565-9-2)" d="m 87.31746,19.86731 11.158847,0" id="path6238-3-6"></path>
      <path style="display:inline;fill:#ff781a;fill-opacity:1;stroke:#f08b25;stroke-width:4.23999977;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-dasharray:none;stroke-opacity:1" d="m 52.38618,19.49637 10,0" id="path6238-3-6-3"></path>
    </g>
    <g id="g4799" transform="matrix(3.5433071,0,0,3.5433071,-189.85877,455.78179)">
      <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" x="116.97348" y="31.901192" id="text4741-9-0-6-6-4"><tspan id="tspan4739-8-0-32-6-4" x="116.97348" y="31.901192" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ff781a;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1">orange:</tspan></text>
      <path style="clip-rule:evenodd;fill:#00218a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.00081677;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" id="curve0-1-9-2-9" d="m 172.71114,32.31527 1.66375,-1.66294 -1.66375,-1.66294 c -0.10128,-0.10209 -0.10128,-0.2679 0,-0.36999 l 1.10917,-1.10918 c 0.10209,-0.10128 0.2679,-0.10128 0.36999,0 l 1.66295,1.66376 1.66293,-1.66376 c 0.10209,-0.10128 0.2679,-0.10128 0.36999,0 l 1.10918,1.10918 c 0.10127,0.10209 0.10127,0.2679 0,0.36999 l -1.66375,1.66294 1.66375,1.66294 c 0.10127,0.1021 0.10127,0.2679 0,0.37 l -1.10918,1.10917 c -0.10209,0.10128 -0.2679,0.10128 -0.36999,0 l -1.66293,-1.66376 -1.66295,1.66376 c -0.10209,0.10128 -0.2679,0.10128 -0.36999,0 l -1.10917,-1.10917 c -0.10128,-0.1021 -0.10128,-0.2679 0,-0.37 z"></path>
      <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#00218a;fill-opacity:1;stroke:none;stroke-width:0.26458332" x="150.03226" y="33.217201" id="text4741-9-0-8-8-5-2"><tspan id="tspan4739-8-0-3-4-6-7" x="150.03226" y="33.217201" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#00218a;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1">0.03</tspan></text>
      <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" x="117.58551" y="11.901192" id="text4741-9-0-8-8-5"><tspan id="tspan4739-8-0-3-4-6" x="117.58551" y="11.901192" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ff781a;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1">apple:</tspan></text>
      <path style="clip-rule:evenodd;fill:#00218a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.00081677;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" id="curve0-5-3" d="m 175.1402,10.32264 3.21316,-3.21317 c 0.10128,-0.10128 0.2679,-0.10128 0.36918,0 l 0.93765,0.93765 c 0.10128,0.10128 0.10128,0.2679 0,0.36918 l -4.3354,4.33541 c -0.10128,0.10128 -0.2679,0.10128 -0.36918,0 l -2.24448,-2.24448 c -0.10128,-0.10128 -0.10128,-0.2679 0,-0.36918 l 0.93765,-0.93765 c 0.10128,-0.10128 0.2679,-0.10128 0.36918,0 z"></path>
      <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#00218a;fill-opacity:1;stroke:none;stroke-width:0.26458332" x="150.03226" y="12.495461" id="text4741-9-0-8-8-5-2-7"><tspan id="tspan4739-8-0-3-4-6-7-8" x="150.03226" y="12.495461" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#00218a;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1">0.85</tspan></text>
      <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" x="117.23578" y="22.832405" id="text4741-9-0-9-6-1"><tspan id="tspan4739-8-0-0-7-5" x="117.23578" y="22.832405" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#ff781a;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1">lemon:</tspan></text>
      <path style="clip-rule:evenodd;fill:#00218a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.00081677;stroke-opacity:1;image-rendering:optimizeQuality;shape-rendering:geometricPrecision;text-rendering:geometricPrecision" id="curve0-1-7-9" d="m 172.71114,21.86844 1.66375,-1.66294 -1.66375,-1.66294 c -0.10128,-0.10209 -0.10128,-0.2679 0,-0.36999 l 1.10917,-1.10918 c 0.10209,-0.10128 0.2679,-0.10128 0.36999,0 l 1.66295,1.66376 1.66293,-1.66376 c 0.10209,-0.10128 0.2679,-0.10128 0.36999,0 l 1.10918,1.10918 c 0.10127,0.10209 0.10127,0.2679 0,0.36999 l -1.66375,1.66294 1.66375,1.66294 c 0.10127,0.1021 0.10127,0.2679 0,0.37 l -1.10918,1.10917 c -0.10209,0.10128 -0.2679,0.10128 -0.36999,0 l -1.66293,-1.66376 -1.66295,1.66376 c -0.10209,0.10128 -0.2679,0.10128 -0.36999,0 l -1.10917,-1.10917 c -0.10128,-0.1021 -0.10128,-0.2679 0,-0.37 z"></path>
      <text xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#00218a;fill-opacity:1;stroke:none;stroke-width:0.26458332" x="150.03226" y="22.770393" id="text4741-9-0-8-8-5-2-4"><tspan id="tspan4739-8-0-3-4-6-7-7" x="150.03226" y="22.770393" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7.05555534px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#00218a;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1">0.12</tspan></text>
    </g>
    <rect y="457.02966" x="-188.61087" height="139.23653" width="139.23653" id="rect4527-0-8-2-3" style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:#ff781a;stroke-width:2.49575877;stroke-miterlimit:0;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"></rect>
    <g style="stroke-width:0.33863187;stroke-miterlimit:4;stroke-dasharray:none" transform="matrix(2.8823114,0,0,2.8823116,-156.2011,483.89655)" id="g13312">
      <g style="stroke-width:0.33863187;stroke-miterlimit:4;stroke-dasharray:none" transform="translate(357.92077,-436.40124)" id="g13314"></g>
      <path style="fill:#f28d26;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.33863187;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 14.157525,9.013882 C 0.21717609,1.4975822 -7.7686107,27.051885 12.43738,29.522021 c 0.593881,0.07259 0.656428,-0.416331 1.642612,-0.450303 0.830812,-0.02862 0.879914,0.396332 1.346767,0.383535 C 36.010948,28.890984 28.773935,1.6834144 14.157525,9.0139156 Z" id="path13316"></path>
      <path style="fill:#f28d26;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.33863187;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="M 13.1237,7.8307358 C 13.852315,8.2261715 15.264061,8.1868031 15.579971,7.5692655 16.354065,6.0560722 15.088418,4.5540503 19.831208,3.673977 20.481665,3.553276 21.915739,-0.13569493 18.319656,0.27298639 14.465359,0.71101272 12.890319,4.5142708 13.1237,7.8307358 Z" id="path13318"></path>
      <path style="fill:#ffffff;fill-rule:evenodd;stroke:none;stroke-width:0.33863187;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" d="m 5.3297627,20.159326 c -1.1502171,-5.053855 0.1801964,-8.041607 5.3849023,-7.652229 0.296243,0.02217 1.50778,-1.765287 -0.283417,-1.936674 -6.8792268,-0.6582232 -8.765781,4.076005 -7.0853961,9.777847 0.2409076,0.817446 2.2651037,1.046571 1.9839108,-0.188944 z" id="path13320"></path>
    </g>
  </g>
</svg><div style="margin-bottom:30px;text-align:center;" class="caption">
A possible classification example, in which the network distinguishes
three classes. The input image gets confidence
values assigned for each of the three distinguished classes: 'apple'
0.85, 'lemon' 0.03, and 'orange' 0.12. The top prediction tells us,
the image is recognized as 'apple'.
</div>
</div>
<p>In order to do your specific task, thus to classify your data into the
classes you want to have distinguished, the classifier has to be trained
accordingly.
In HALCON, we use a technique called transfer learning
(see also the chapter <a href="toc_deeplearning.html">Deep Learning</a>).
Hence, we provide pretrained networks, representing classifiers which have
been trained on huge amounts of labeled image data.
These classifiers have been trained and tested to perform well on
industrial image classification tasks.
One of these classifiers, already trained for general classifications, is
now retrained for your specific task.
For this, the classifier needs to know, which classes are to be
distinguished and how such examples look like.
This is represented by your dataset, i.e., your images with the
corresponding ground truth labels. More information on the data requirements
can be found in the section “Data”.
</p>
<p>In HALCON, classification with deep learning is implemented within the more
general deep learning model. For more information to the latter one, see the
chapter <a href="toc_deeplearning_model.html">Deep Learning / Model</a>.
For the specific system requirements in order to apply deep learning,
please refer to the HALCON <code>“Installation Guide”</code>.
</p>
<p>The following sections are introductions to the general workflow needed for
classification, information related to the involved data and
parameters, and explanations to the evaluation measures.
</p>
<h3>General Workflow</h3>
<p>In this paragraph, we describe the general workflow for a classification
task based on deep learning. It is subdivided into the four parts
preprocessing of the data, training of the model,
evaluation of the trained model, and inference on new images.
Thereby we assume, your dataset is already labeled, see also the section
“Data” below.
Have a look at the HDevelop example series
<code>classify_pill_defects_deep_learning</code> for an application.
</p>
<dl class="generic">


<dt><b>Preprocess the data</b></dt>
<dd>
<p>

This part is about how to preprocess your data.
The single steps are also shown in the HDevelop example
<code>classify_pill_defects_deep_learning_1_preprocess.hdev</code>.
</p>
<ol>

<li>
<p> The information what is to be found in which image of your
training dataset needs to be transferred. This is done by the
procedure
</p>
<ul>
<li>
<p> <code>read_dl_dataset_classification</code>.
</p>
</li>
</ul>
<p>
Thereby a dictionary <code>DLDataset</code> is created, which serves as
a database and stores all necessary information about your data.
For more information about the data and the way it is transferred,
see the section “Data” below and the chapter
<a href="toc_deeplearning_model.html">Deep Learning / Model</a>.
</p>
</li>
<li>
<p> Split the dataset represented by the dictionary
<code>DLDataset</code>. This can be done using the procedure
</p>
<ul>
<li>
<p> <code>split_dl_dataset</code>.
</p>
</li>
</ul>
<p>
The resulting split will be saved over the key <code>split</code> in
each sample entry of <code>DLDataset</code>.
</p>
</li>
<li>
<p> Read in a pretrained network using 该算子
</p>
<ul>
<li>
<p> <a href="read_dl_model.html"><code><span data-if="hdevelop" style="display:inline"><code>read_dl_model</code></span><span data-if="c" style="display:none"><code>read_dl_model</code></span><span data-if="cpp" style="display:none"><code>ReadDlModel</code></span><span data-if="com" style="display:none"><code>ReadDlModel</code></span><span data-if="dotnet" style="display:none"><code>ReadDlModel</code></span><span data-if="python" style="display:none"><code>read_dl_model</code></span></code></a>.
</p>
</li>
</ul>
<p>
This operator is likewise used when you want to read your own trained
networks, after you saved them with <a href="write_dl_model.html"><code><span data-if="hdevelop" style="display:inline"><code>write_dl_model</code></span><span data-if="c" style="display:none"><code>write_dl_model</code></span><span data-if="cpp" style="display:none"><code>WriteDlModel</code></span><span data-if="com" style="display:none"><code>WriteDlModel</code></span><span data-if="dotnet" style="display:none"><code>WriteDlModel</code></span><span data-if="python" style="display:none"><code>write_dl_model</code></span></code></a>.
</p>
<p>The network will impose several requirements on the images,
as the image dimensions and the gray value range.
The default values are listed in <a href="read_dl_model.html"><code><span data-if="hdevelop" style="display:inline"><code>read_dl_model</code></span><span data-if="c" style="display:none"><code>read_dl_model</code></span><span data-if="cpp" style="display:none"><code>ReadDlModel</code></span><span data-if="com" style="display:none"><code>ReadDlModel</code></span><span data-if="dotnet" style="display:none"><code>ReadDlModel</code></span><span data-if="python" style="display:none"><code>read_dl_model</code></span></code></a>. These are
the values with which the networks have been pretrained.
The network architectures allow different image dimensions, which can
be set with <a href="set_dl_model_param.html"><code><span data-if="hdevelop" style="display:inline"><code>set_dl_model_param</code></span><span data-if="c" style="display:none"><code>set_dl_model_param</code></span><span data-if="cpp" style="display:none"><code>SetDlModelParam</code></span><span data-if="com" style="display:none"><code>SetDlModelParam</code></span><span data-if="dotnet" style="display:none"><code>SetDlModelParam</code></span><span data-if="python" style="display:none"><code>set_dl_model_param</code></span></code></a>, but depending on the
network a change may make a retraining necessary.
The actually set values can be retrieved with
</p>
<ul>
<li>
<p> <a href="get_dl_model_param.html"><code><span data-if="hdevelop" style="display:inline"><code>get_dl_model_param</code></span><span data-if="c" style="display:none"><code>get_dl_model_param</code></span><span data-if="cpp" style="display:none"><code>GetDlModelParam</code></span><span data-if="com" style="display:none"><code>GetDlModelParam</code></span><span data-if="dotnet" style="display:none"><code>GetDlModelParam</code></span><span data-if="python" style="display:none"><code>get_dl_model_param</code></span></code></a>.
</p>
</li>
</ul>

</li>
<li>
<p> Now you can preprocess your dataset. For this, you can use the
procedure
</p>
<ul>
<li>
<p> <code>preprocess_dl_dataset</code>.
</p>
</li>
</ul>
<p>
In case of custom preprocessing, this procedure offers guidance on
the implementation.
</p>
<p>To use this procedure,
specify the preprocessing parameters as e.g., the image size.
Store all the parameters with their values in a dictionary
<code>DLPreprocessParam</code>, wherefore you can use the procedure
</p>
<ul>
<li>
<p> <code>create_dl_preprocess_param</code>.
</p>
</li>
</ul>
<p>
We recommend to save this dictionary <code>DLPreprocessParam</code>
in order to have access to the preprocessing parameter values
later during the inference phase.
</p>
</li>
</ol>

</dd>

<dt><b>Training of the model</b></dt>
<dd>
<p>

This part is about how to train a classifier.
The single steps are also shown in the HDevelop example
<code>classify_pill_defects_deep_learning_2_train.hdev</code>.
</p>
<ol>

<li>
<p> Set the training parameters and store them
in the dictionary <code>TrainParam</code>.
These parameters include:
</p>
<ul>
<li>
<p> the hyperparameters, for an overview see the chapter
<a href="toc_deeplearning.html">Deep Learning</a>.
</p>
</li>
<li>
<p> parameters for possible data augmentation (optional).
</p>
</li>
<li>
<p> parameters for the evaluation during training.
</p>
</li>
<li>
<p> parameters for the visualization of training results.
</p>
</li>
<li>
<p> parameters for serialization.
</p>
</li>
</ul>

<p>This can be done using the procedure
</p>
<ul>
<li>
<p> <code>create_dl_train_param</code>.
</p>
</li>
</ul>

</li>
<li>
<p> Train the model. This can be done using the procedure
</p>
<ul>
<li>
<p> <code>train_dl_model</code>.
</p>
</li>
</ul>
<p>
The procedure expects:
</p>
<ul>
<li>
<p> the model handle <code><span data-if="hdevelop" style="display:inline"><code>DLModelHandle</code></span><span data-if="c" style="display:none"><code>DLModelHandle</code></span><span data-if="cpp" style="display:none"><code>DLModelHandle</code></span><span data-if="com" style="display:none"><code>DLModelHandle</code></span><span data-if="dotnet" style="display:none"><code>DLModelHandle</code></span><span data-if="python" style="display:none"><code>dlmodel_handle</code></span></code>
</p>
</li>
<li>
<p> the dictionary with the data information <code>DLDataset</code>
</p>
</li>
<li>
<p> the dictionary with the training parameter
<i><span data-if="hdevelop" style="display:inline"><code>'TrainParam'</code></span><span data-if="c" style="display:none"><code>"TrainParam"</code></span><span data-if="cpp" style="display:none"><code>"TrainParam"</code></span><span data-if="com" style="display:none"><code>"TrainParam"</code></span><span data-if="dotnet" style="display:none"><code>"TrainParam"</code></span><span data-if="python" style="display:none"><code>"TrainParam"</code></span></i>
</p>
</li>
<li>
<p> the information, over how many epochs the training shall run.
</p>
</li>
</ul>

<p>In case the procedure <code>train_dl_model</code> is used, the total loss
as well as optional evaluation measures are visualized.
</p>
</li>
</ol>

</dd>

<dt><b>Evaluation of the trained model</b></dt>
<dd>
<p>

In this part we evaluate the trained classifier.
The single steps are also shown in the HDevelop example
<code>classify_pill_defects_deep_learning_3_evaluate.hdev</code>.
</p>
<ol>

<li>
<p> The evaluation can conveniently be done using the procedure
</p>
<ul>
<li>
<p> <code>evaluate_dl_model</code>.
</p>
</li>
</ul>

</li>
<li>
<p> The dictionary <code>EvaluationResult</code> holds the asked
evaluation measures.
You can visualize your evaluation results using the procedure
</p>
<ul>
<li>
<p> <code>dev_display_classification_evaluation</code>.
</p>
</li>
</ul>

</li>
<li>
<p> A heatmap can be generated for specified samples using
</p>
<ol>
<li>
<p> 该算子 <a href="gen_dl_model_heatmap.html"><code><span data-if="hdevelop" style="display:inline"><code>gen_dl_model_heatmap</code></span><span data-if="c" style="display:none"><code>gen_dl_model_heatmap</code></span><span data-if="cpp" style="display:none"><code>GenDlModelHeatmap</code></span><span data-if="com" style="display:none"><code>GenDlModelHeatmap</code></span><span data-if="dotnet" style="display:none"><code>GenDlModelHeatmap</code></span><span data-if="python" style="display:none"><code>gen_dl_model_heatmap</code></span></code></a>
</p>
</li>
<li>
<p> the procedure <code>gen_dl_model_classification_heatmap</code>
</p>
</li>
</ol>

</li>
</ol>

</dd>

<dt><b>Inference on new images</b></dt>
<dd>
<p>

This part covers the application of a deep-learning-based
classification model.
The single steps are also shown in the HDevelop example
<code>classify_pill_defects_deep_learning_4_infer.hdev</code>.
</p>
<ol>

<li>
<p> Set the parameters as e.g., <i><span data-if="hdevelop" style="display:inline"><code>'batch_size'</code></span><span data-if="c" style="display:none"><code>"batch_size"</code></span><span data-if="cpp" style="display:none"><code>"batch_size"</code></span><span data-if="com" style="display:none"><code>"batch_size"</code></span><span data-if="dotnet" style="display:none"><code>"batch_size"</code></span><span data-if="python" style="display:none"><code>"batch_size"</code></span></i>
using 该算子
</p>
<ul>
<li>
<p> <a href="set_dl_model_param.html"><code><span data-if="hdevelop" style="display:inline"><code>set_dl_model_param</code></span><span data-if="c" style="display:none"><code>set_dl_model_param</code></span><span data-if="cpp" style="display:none"><code>SetDlModelParam</code></span><span data-if="com" style="display:none"><code>SetDlModelParam</code></span><span data-if="dotnet" style="display:none"><code>SetDlModelParam</code></span><span data-if="python" style="display:none"><code>set_dl_model_param</code></span></code></a>.
</p>
</li>
</ul>

</li>
<li>
<p> Generate a data dictionary <code>DLSample</code> for each image.
This can be done using the procedure
</p>
<ul>
<li>
<p> <code>gen_dl_samples_from_images</code>.
</p>
</li>
</ul>

</li>
<li>
<p> Preprocess the images as done for the training.
We recommend to do this using the procedure
</p>
<ul>
<li>
<p> <code>preprocess_dl_samples</code>.
</p>
</li>
</ul>
<p>
When you saved the dictionary <code>DLPreprocessParam</code> during
the preprocessing step, you can directly use it as input to specify
all parameter values.
</p>
</li>
<li>
<p> Apply the model using 该算子
</p>
<ul>
<li>
<p> <a href="apply_dl_model.html"><code><span data-if="hdevelop" style="display:inline"><code>apply_dl_model</code></span><span data-if="c" style="display:none"><code>apply_dl_model</code></span><span data-if="cpp" style="display:none"><code>ApplyDlModel</code></span><span data-if="com" style="display:none"><code>ApplyDlModel</code></span><span data-if="dotnet" style="display:none"><code>ApplyDlModel</code></span><span data-if="python" style="display:none"><code>apply_dl_model</code></span></code></a>.
</p>
</li>
</ul>

</li>
<li>
<p> Retrieve the results from the dictionary
<i><span data-if="hdevelop" style="display:inline"><code>'DLResultBatch'</code></span><span data-if="c" style="display:none"><code>"DLResultBatch"</code></span><span data-if="cpp" style="display:none"><code>"DLResultBatch"</code></span><span data-if="com" style="display:none"><code>"DLResultBatch"</code></span><span data-if="dotnet" style="display:none"><code>"DLResultBatch"</code></span><span data-if="python" style="display:none"><code>"DLResultBatch"</code></span></i>.
</p>
</li>
</ol>

</dd>
</dl>
<h3>Data</h3>
<p>We distinguish between data used for training and data for inference.
Latter one consists of bare images. But for the former one you already
know to which class the images belong and provide this information over
the corresponding labels.
</p>
<p>As a basic concept, the model handles data over dictionaries, meaning it
receives the input data over a dictionary <code>DLSample</code> and
returns a dictionary <code>DLResult</code> and <code>DLTrainResult</code>,
respectively. More information on the
data handling can be found in the chapter <a href="toc_deeplearning_model.html">Deep Learning / Model</a>.
</p>
<dl class="generic">


<dt><b>Data for training and evaluation</b></dt>
<dd>
<p>

The dataset consists of images and corresponding information.
They have to be provided in a way the model can process them.
Concerning the image requirements, find more information in the section
“Images” below.
</p>
<p>The training data is used to train and evaluate a network for your
specific task. With the aid of this data the classifier can learn which
classes are to be distinguished and how their representatives look like.
In classification, the image is classified as a whole.
Therefore, the training data consists of images and their ground truth
labels, thus the class you say this image belongs to.
Note that the images should be as representative as possible for your
task.
There are different ways possible, how to store and retrieve this
information.
How the data has to be formatted in HALCON for a DL model is explained
in the chapter <a href="toc_deeplearning_model.html">Deep Learning / Model</a>.
In short, a dictionary <code>DLDataset</code> serves as a database for
the information needed by the training and evaluation procedures.
The procedure <code>read_dl_dataset_classification</code> supports the
following sources of the ground truth label for an image:
</p>
<ul>
<li>
<p> The last directory name containing the image
</p>
</li>
<li>
<p> The file name.
</p>
</li>
</ul>

<p>For training a classifier, we use a technique called transfer learning
(see the chapter <a href="toc_deeplearning.html">Deep Learning</a>).
For this, you need less resources, but still a suitable set of data.
While in general the network should be more reliable when trained on a
larger dataset, the amount of data needed for training also depends on
the complexity of the task.
You also want enough training data to split it into three subsets, used
for training, validation, and testing the network. These subsets are
preferably independent and identically distributed, see the section
“Data” in the chapter <a href="toc_deeplearning.html">Deep Learning</a>.
</p>
</dd>

<dt><b>Images</b></dt>
<dd>
<p>

Regardless of the application, the network poses requirements on the
images regarding e.g., the image dimensions.
The specific values depend on the network itself and can be queried with
<a href="get_dl_model_param.html"><code><span data-if="hdevelop" style="display:inline"><code>get_dl_model_param</code></span><span data-if="c" style="display:none"><code>get_dl_model_param</code></span><span data-if="cpp" style="display:none"><code>GetDlModelParam</code></span><span data-if="com" style="display:none"><code>GetDlModelParam</code></span><span data-if="dotnet" style="display:none"><code>GetDlModelParam</code></span><span data-if="python" style="display:none"><code>get_dl_model_param</code></span></code></a>.
In order to fulfill these requirements, you may have to preprocess your
images.
Standard preprocessing is implemented in <code>preprocess_dl_dataset</code>
and in <code>preprocess_dl_samples</code> for a single sample, respectively.
In case of custom preprocessing these procedures offer guidance on the
implementation.
</p>
</dd>

<dt><b>Network output</b></dt>
<dd>
<p>

The network output depends on the task:
</p>
<dl class="generic">

<dt><b>training</b></dt>
<dd>
<p>

As output, 该算子 will return a dictionary <code><span data-if="hdevelop" style="display:inline"><code>DLTrainResult</code></span><span data-if="c" style="display:none"><code>DLTrainResult</code></span><span data-if="cpp" style="display:none"><code>DLTrainResult</code></span><span data-if="com" style="display:none"><code>DLTrainResult</code></span><span data-if="dotnet" style="display:none"><code>DLTrainResult</code></span><span data-if="python" style="display:none"><code>dltrain_result</code></span></code>
with the current value of the total loss as well as values for all
other losses included in your model.
</p>
</dd>

<dt><b>inference and evaluation</b></dt>
<dd><p>

As output, the network will return a dictionary <code><span data-if="hdevelop" style="display:inline"><code>DLResult</code></span><span data-if="c" style="display:none"><code>DLResult</code></span><span data-if="cpp" style="display:none"><code>DLResult</code></span><span data-if="com" style="display:none"><code>DLResult</code></span><span data-if="dotnet" style="display:none"><code>DLResult</code></span><span data-if="python" style="display:none"><code>dlresult</code></span></code>
for every sample.
For classification, this dictionary will include for each input
image a tuple with the confidence values for every class to be
distinguished in decreasing order and a second tuple with the
corresponding class IDs.
</p></dd>
</dl>
</dd>
</dl>
<h3>Interpreting the Classification Results</h3>
<p>When we classify an image, we obtain a set of confidence values,
telling us the affinity of the image to every class. It is also possible to
compute the following values.
</p>
<dl class="generic">


<dt><b>Confusion Matrix, Precision, Recall, and F-score</b></dt>
<dd>


<p>In classification whole images are classified. As a consequence, the
instances of a confusion matrix are images. See the chapter
<a href="toc_deeplearning.html">Deep Learning</a> for explanations on confusion matrices.
</p>
<p>You can generate a confusion matrix with the aid of the procedures
<code>gen_confusion_matrix</code> and
<code>gen_interactive_confusion_matrix</code>.
Thereby, the interactive procedure gives you the possibility to select
examples of a specific category, but it does not work with exported code.
</p>
<p>From such a confusion matrix you can derive various values.
The precision is the proportion of all correct predicted
positives to all predicted positives (true and false ones).
Thus, it is a measure of how many positive predictions really belong to
the selected class.
</p>
<p><span title="1" class="displaymath"><!-- Created by MetaPost 1.902 on 2023.05.15:2033 --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="45.4795em" height="5.03411em" viewBox="0 0 727.672058 80.545746">
<!-- Original BoundingBox: -363.836029 -40.272873 363.836029 40.272873 -->
  <defs>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_43">
      <path style="fill-rule: evenodd;" d="M409.000000 -230.000000L688.000000 -230.000000C702.000000 -230.000000,721.000000 -230.000000,721.000000 -250.000000C721.000000 -270.000000,702.000000 -270.000000,688.000000 -270.000000L409.000000 -270.000000L409.000000 -550.000000C409.000000 -564.000000,409.000000 -583.000000,389.000000 -583.000000C369.000000 -583.000000,369.000000 -564.000000,369.000000 -550.000000L369.000000 -270.000000L89.000000 -270.000000C75.000000 -270.000000,56.000000 -270.000000,56.000000 -250.000000C56.000000 -230.000000,75.000000 -230.000000,89.000000 -230.000000L369.000000 -230.000000L369.000000 50.000000C369.000000 64.000000,369.000000 83.000000,389.000000 83.000000C409.000000 83.000000,409.000000 64.000000,409.000000 50.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_61">
      <path style="fill-rule: evenodd;" d="M687.000000 -327.000000C702.000000 -327.000000,721.000000 -327.000000,721.000000 -347.000000C721.000000 -367.000000,702.000000 -367.000000,688.000000 -367.000000L89.000000 -367.000000C75.000000 -367.000000,56.000000 -367.000000,56.000000 -347.000000C56.000000 -327.000000,75.000000 -327.000000,90.000000 -327.000000M688.000000 -133.000000C702.000000 -133.000000,721.000000 -133.000000,721.000000 -153.000000C721.000000 -173.000000,702.000000 -173.000000,687.000000 -173.000000L90.000000 -173.000000C75.000000 -173.000000,56.000000 -173.000000,56.000000 -153.000000C56.000000 -133.000000,75.000000 -133.000000,89.000000 -133.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_70">
      <path style="fill-rule: evenodd;" d="M479.000000 -231.000000L479.000000 -463.000000L456.000000 -463.000000C444.000000 -383.000000,426.000000 -368.000000,346.000000 -368.000000L201.000000 -368.000000L201.000000 -590.000000C201.000000 -618.000000,206.000000 -624.000000,233.000000 -624.000000L369.000000 -624.000000C482.000000 -624.000000,504.000000 -609.000000,521.000000 -519.000000L546.000000 -519.000000L543.000000 -662.000000L12.000000 -662.000000L12.000000 -643.000000C86.000000 -637.000000,99.000000 -623.000000,99.000000 -553.000000L99.000000 -120.000000C99.000000 -37.000000,88.000000 -24.000000,12.000000 -19.000000L12.000000 -0.000000L292.000000 -0.000000L292.000000 -19.000000C215.000000 -23.000000,201.000000 -37.000000,201.000000 -109.000000L201.000000 -327.000000L346.000000 -327.000000C427.000000 -327.000000,444.000000 -312.000000,456.000000 -231.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_80">
      <path style="fill-rule: evenodd;" d="M202.000000 -291.000000C228.000000 -289.000000,245.000000 -288.000000,271.000000 -288.000000C349.000000 -288.000000,403.000000 -298.000000,446.000000 -322.000000C506.000000 -354.000000,542.000000 -415.000000,542.000000 -481.000000C542.000000 -523.000000,528.000000 -561.000000,501.000000 -590.000000C461.000000 -634.000000,374.000000 -662.000000,280.000000 -662.000000L16.000000 -662.000000L16.000000 -643.000000C90.000000 -635.000000,100.000000 -625.000000,100.000000 -553.000000L100.000000 -120.000000C100.000000 -36.000000,92.000000 -26.000000,16.000000 -19.000000L16.000000 -0.000000L296.000000 -0.000000L296.000000 -19.000000C217.000000 -22.000000,202.000000 -36.000000,202.000000 -109.000000M202.000000 -591.000000C202.000000 -618.000000,209.000000 -625.000000,236.000000 -625.000000C371.000000 -625.000000,433.000000 -578.000000,433.000000 -475.000000C433.000000 -378.000000,374.000000 -328.000000,259.000000 -328.000000C239.000000 -328.000000,225.000000 -329.000000,202.000000 -331.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_84">
      <path style="fill-rule: evenodd;" d="M254.000000 -620.000000L254.000000 -120.000000C254.000000 -35.000000,243.000000 -24.000000,160.000000 -19.000000L160.000000 -0.000000L452.000000 -0.000000L452.000000 -19.000000C370.000000 -23.000000,356.000000 -36.000000,356.000000 -109.000000L356.000000 -620.000000L410.000000 -620.000000C524.000000 -620.000000,546.000000 -602.000000,569.000000 -492.000000L593.000000 -492.000000L587.000000 -662.000000L23.000000 -662.000000L17.000000 -492.000000L41.000000 -492.000000C65.000000 -601.000000,88.000000 -620.000000,200.000000 -620.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_99">
      <path style="fill-rule: evenodd;" d="M398.000000 -156.000000C350.000000 -86.000000,314.000000 -62.000000,257.000000 -62.000000C166.000000 -62.000000,102.000000 -142.000000,102.000000 -257.000000C102.000000 -360.000000,157.000000 -431.000000,238.000000 -431.000000C274.000000 -431.000000,287.000000 -420.000000,297.000000 -383.000000L303.000000 -361.000000C311.000000 -333.000000,329.000000 -315.000000,350.000000 -315.000000C376.000000 -315.000000,398.000000 -334.000000,398.000000 -357.000000C398.000000 -413.000000,328.000000 -460.000000,244.000000 -460.000000C195.000000 -460.000000,144.000000 -440.000000,103.000000 -404.000000C53.000000 -360.000000,25.000000 -292.000000,25.000000 -213.000000C25.000000 -83.000000,104.000000 10.000000,215.000000 10.000000C260.000000 10.000000,300.000000 -6.000000,336.000000 -37.000000C363.000000 -61.000000,382.000000 -88.000000,412.000000 -147.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_101">
      <path style="fill-rule: evenodd;" d="M408.000000 -164.000000C360.000000 -88.000000,317.000000 -59.000000,253.000000 -59.000000C196.000000 -59.000000,153.000000 -88.000000,124.000000 -145.000000C106.000000 -183.000000,99.000000 -216.000000,97.000000 -277.000000L405.000000 -277.000000C397.000000 -342.000000,387.000000 -371.000000,362.000000 -403.000000C332.000000 -439.000000,286.000000 -460.000000,234.000000 -460.000000C184.000000 -460.000000,137.000000 -442.000000,99.000000 -408.000000C52.000000 -367.000000,25.000000 -296.000000,25.000000 -214.000000C25.000000 -76.000000,97.000000 10.000000,212.000000 10.000000C307.000000 10.000000,382.000000 -49.000000,424.000000 -157.000000M99.000000 -309.000000C110.000000 -387.000000,144.000000 -424.000000,205.000000 -424.000000C266.000000 -424.000000,290.000000 -396.000000,303.000000 -309.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_105">
      <path style="fill-rule: evenodd;" d="M175.000000 -460.000000L20.000000 -405.000000L20.000000 -390.000000L28.000000 -391.000000C40.000000 -393.000000,53.000000 -394.000000,62.000000 -394.000000C86.000000 -394.000000,95.000000 -378.000000,95.000000 -334.000000L95.000000 -102.000000C95.000000 -30.000000,85.000000 -19.000000,16.000000 -15.000000L16.000000 -0.000000L253.000000 -0.000000L253.000000 -15.000000C187.000000 -20.000000,179.000000 -30.000000,179.000000 -102.000000L179.000000 -457.000000M128.000000 -683.000000C101.000000 -683.000000,78.000000 -660.000000,78.000000 -632.000000C78.000000 -604.000000,100.000000 -581.000000,128.000000 -581.000000C157.000000 -581.000000,180.000000 -603.000000,180.000000 -632.000000C180.000000 -660.000000,157.000000 -683.000000,128.000000 -683.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_110">
      <path style="fill-rule: evenodd;" d="M16.000000 -398.000000C22.000000 -401.000000,32.000000 -402.000000,43.000000 -402.000000C71.000000 -402.000000,80.000000 -387.000000,80.000000 -338.000000L80.000000 -90.000000C80.000000 -33.000000,69.000000 -19.000000,18.000000 -15.000000L18.000000 -0.000000L230.000000 -0.000000L230.000000 -15.000000C179.000000 -19.000000,164.000000 -31.000000,164.000000 -67.000000L164.000000 -348.000000C212.000000 -393.000000,234.000000 -405.000000,267.000000 -405.000000C316.000000 -405.000000,340.000000 -374.000000,340.000000 -308.000000L340.000000 -99.000000C340.000000 -36.000000,327.000000 -19.000000,277.000000 -15.000000L277.000000 -0.000000L485.000000 -0.000000L485.000000 -15.000000C436.000000 -20.000000,424.000000 -32.000000,424.000000 -81.000000L424.000000 -310.000000C424.000000 -404.000000,380.000000 -460.000000,306.000000 -460.000000C260.000000 -460.000000,229.000000 -443.000000,161.000000 -379.000000L161.000000 -458.000000L154.000000 -460.000000C105.000000 -442.000000,71.000000 -431.000000,16.000000 -415.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_111">
      <path style="fill-rule: evenodd;" d="M250.000000 -460.000000C120.000000 -460.000000,29.000000 -364.000000,29.000000 -226.000000C29.000000 -91.000000,122.000000 10.000000,248.000000 10.000000C374.000000 10.000000,470.000000 -96.000000,470.000000 -234.000000C470.000000 -365.000000,378.000000 -460.000000,250.000000 -460.000000M237.000000 -432.000000C321.000000 -432.000000,380.000000 -336.000000,380.000000 -199.000000C380.000000 -86.000000,335.000000 -18.000000,260.000000 -18.000000C221.000000 -18.000000,184.000000 -42.000000,163.000000 -82.000000C135.000000 -134.000000,119.000000 -204.000000,119.000000 -275.000000C119.000000 -370.000000,166.000000 -432.000000,237.000000 -432.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_112">
      <path style="fill-rule: evenodd;" d="M9.000000 -393.000000C18.000000 -394.000000,25.000000 -394.000000,34.000000 -394.000000C68.000000 -394.000000,75.000000 -384.000000,75.000000 -337.000000L75.000000 131.000000C75.000000 183.000000,64.000000 194.000000,5.000000 200.000000L5.000000 217.000000L247.000000 217.000000L247.000000 199.000000C172.000000 198.000000,159.000000 187.000000,159.000000 124.000000L159.000000 -33.000000C194.000000 -0.000000,218.000000 10.000000,260.000000 10.000000C378.000000 10.000000,470.000000 -102.000000,470.000000 -247.000000C470.000000 -371.000000,400.000000 -460.000000,303.000000 -460.000000C247.000000 -460.000000,203.000000 -435.000000,159.000000 -381.000000L159.000000 -458.000000L153.000000 -460.000000C99.000000 -439.000000,64.000000 -426.000000,9.000000 -409.000000M159.000000 -334.000000C159.000000 -364.000000,215.000000 -400.000000,261.000000 -400.000000C335.000000 -400.000000,384.000000 -324.000000,384.000000 -208.000000C384.000000 -97.000000,335.000000 -22.000000,263.000000 -22.000000C216.000000 -22.000000,159.000000 -58.000000,159.000000 -88.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_114">
      <path style="fill-rule: evenodd;" d="M7.000000 -390.000000C21.000000 -393.000000,30.000000 -394.000000,42.000000 -394.000000C67.000000 -394.000000,76.000000 -378.000000,76.000000 -334.000000L76.000000 -84.000000C76.000000 -34.000000,69.000000 -27.000000,5.000000 -15.000000L5.000000 -0.000000L245.000000 -0.000000L245.000000 -15.000000C177.000000 -18.000000,160.000000 -33.000000,160.000000 -90.000000L160.000000 -315.000000C160.000000 -347.000000,203.000000 -397.000000,230.000000 -397.000000C236.000000 -397.000000,245.000000 -392.000000,256.000000 -382.000000C272.000000 -368.000000,283.000000 -362.000000,296.000000 -362.000000C320.000000 -362.000000,335.000000 -379.000000,335.000000 -407.000000C335.000000 -440.000000,314.000000 -460.000000,280.000000 -460.000000C238.000000 -460.000000,209.000000 -437.000000,160.000000 -366.000000L160.000000 -458.000000L155.000000 -460.000000C102.000000 -438.000000,66.000000 -425.000000,7.000000 -406.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_115">
      <path style="fill-rule: evenodd;" d="M315.000000 -314.000000L311.000000 -450.000000L300.000000 -450.000000L298.000000 -448.000000C289.000000 -441.000000,288.000000 -440.000000,284.000000 -440.000000C278.000000 -440.000000,268.000000 -442.000000,257.000000 -447.000000C235.000000 -455.000000,213.000000 -459.000000,187.000000 -459.000000C108.000000 -459.000000,51.000000 -408.000000,51.000000 -336.000000C51.000000 -280.000000,83.000000 -240.000000,168.000000 -192.000000L226.000000 -159.000000C261.000000 -139.000000,278.000000 -115.000000,278.000000 -84.000000C278.000000 -40.000000,246.000000 -12.000000,195.000000 -12.000000C161.000000 -12.000000,130.000000 -25.000000,111.000000 -47.000000C90.000000 -72.000000,81.000000 -95.000000,68.000000 -152.000000L52.000000 -152.000000L52.000000 4.000000L65.000000 4.000000C72.000000 -6.000000,76.000000 -8.000000,88.000000 -8.000000C97.000000 -8.000000,111.000000 -6.000000,134.000000 -0.000000C162.000000 6.000000,189.000000 10.000000,207.000000 10.000000C284.000000 10.000000,348.000000 -48.000000,348.000000 -118.000000C348.000000 -168.000000,324.000000 -201.000000,264.000000 -237.000000L156.000000 -301.000000C128.000000 -317.000000,113.000000 -342.000000,113.000000 -369.000000C113.000000 -409.000000,144.000000 -437.000000,190.000000 -437.000000C247.000000 -437.000000,277.000000 -403.000000,300.000000 -314.000000"></path>
    </g>
  </defs>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,277.396866 39.422150)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_112"></use>
    <use xlink:href="#GLYPHptmr8r_114" x="5.000079"></use>
    <use xlink:href="#GLYPHptmr8r_101" x="8.330091"></use>
    <use xlink:href="#GLYPHptmr8r_99" x="12.770102"></use>
    <use xlink:href="#GLYPHptmr8r_105" x="17.210112"></use>
    <use xlink:href="#GLYPHptmr8r_115" x="19.990056"></use>
    <use xlink:href="#GLYPHptmr8r_105" x="23.880014"></use>
    <use xlink:href="#GLYPHptmr8r_111" x="26.659958"></use>
    <use xlink:href="#GLYPHptmr8r_110" x="31.660038"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,340.260941 39.422150)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_61"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,377.603500 28.638443)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_84"></use>
    <use xlink:href="#GLYPHptmr8r_80" x="6.110078"></use>
  </g>
  <path d="M358.999573 35.437027L414.809723 35.437027" style="stroke:rgb(0.000000%,0.000000%,0.000000%); stroke-width: 0.637604;stroke-linejoin: round;stroke-miterlimit: 10.000000;fill: none;"></path>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,358.999573 50.356277)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_84"></use>
    <use xlink:href="#GLYPHptmr8r_80" x="6.110078"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,381.143982 50.356277)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_43"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,397.084213 50.356277)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_70"></use>
    <use xlink:href="#GLYPHptmr8r_80" x="5.560026"></use>
  </g>
</svg></span>
</p>
<p>The recall, also called the "true positive rate", is the
proportion of all correct predicted positives to all real positives.
Thus, it is a measure of how many samples belonging to the selected
class were predicted correctly as positives.
</p>
<p><span title="2" class="displaymath"><!-- Created by MetaPost 1.902 on 2023.05.15:2033 --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="45.4795em" height="4.30612em" viewBox="0 0 727.672058 68.897842">
<!-- Original BoundingBox: -363.836029 -34.448914 363.836029 34.448929 -->
  <defs>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_43">
      <path style="fill-rule: evenodd;" d="M409.000000 -230.000000L688.000000 -230.000000C702.000000 -230.000000,721.000000 -230.000000,721.000000 -250.000000C721.000000 -270.000000,702.000000 -270.000000,688.000000 -270.000000L409.000000 -270.000000L409.000000 -550.000000C409.000000 -564.000000,409.000000 -583.000000,389.000000 -583.000000C369.000000 -583.000000,369.000000 -564.000000,369.000000 -550.000000L369.000000 -270.000000L89.000000 -270.000000C75.000000 -270.000000,56.000000 -270.000000,56.000000 -250.000000C56.000000 -230.000000,75.000000 -230.000000,89.000000 -230.000000L369.000000 -230.000000L369.000000 50.000000C369.000000 64.000000,369.000000 83.000000,389.000000 83.000000C409.000000 83.000000,409.000000 64.000000,409.000000 50.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_61">
      <path style="fill-rule: evenodd;" d="M687.000000 -327.000000C702.000000 -327.000000,721.000000 -327.000000,721.000000 -347.000000C721.000000 -367.000000,702.000000 -367.000000,688.000000 -367.000000L89.000000 -367.000000C75.000000 -367.000000,56.000000 -367.000000,56.000000 -347.000000C56.000000 -327.000000,75.000000 -327.000000,90.000000 -327.000000M688.000000 -133.000000C702.000000 -133.000000,721.000000 -133.000000,721.000000 -153.000000C721.000000 -173.000000,702.000000 -173.000000,687.000000 -173.000000L90.000000 -173.000000C75.000000 -173.000000,56.000000 -173.000000,56.000000 -153.000000C56.000000 -133.000000,75.000000 -133.000000,89.000000 -133.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_70">
      <path style="fill-rule: evenodd;" d="M479.000000 -231.000000L479.000000 -463.000000L456.000000 -463.000000C444.000000 -383.000000,426.000000 -368.000000,346.000000 -368.000000L201.000000 -368.000000L201.000000 -590.000000C201.000000 -618.000000,206.000000 -624.000000,233.000000 -624.000000L369.000000 -624.000000C482.000000 -624.000000,504.000000 -609.000000,521.000000 -519.000000L546.000000 -519.000000L543.000000 -662.000000L12.000000 -662.000000L12.000000 -643.000000C86.000000 -637.000000,99.000000 -623.000000,99.000000 -553.000000L99.000000 -120.000000C99.000000 -37.000000,88.000000 -24.000000,12.000000 -19.000000L12.000000 -0.000000L292.000000 -0.000000L292.000000 -19.000000C215.000000 -23.000000,201.000000 -37.000000,201.000000 -109.000000L201.000000 -327.000000L346.000000 -327.000000C427.000000 -327.000000,444.000000 -312.000000,456.000000 -231.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_78">
      <path style="fill-rule: evenodd;" d="M612.000000 11.000000L612.000000 -515.000000C612.000000 -575.000000,622.000000 -612.000000,641.000000 -625.000000C655.000000 -635.000000,669.000000 -639.000000,707.000000 -643.000000L707.000000 -662.000000L472.000000 -662.000000L472.000000 -643.000000C510.000000 -640.000000,524.000000 -636.000000,539.000000 -627.000000C559.000000 -613.000000,568.000000 -577.000000,568.000000 -515.000000L568.000000 -178.000000L183.000000 -662.000000L12.000000 -662.000000L12.000000 -643.000000C55.000000 -643.000000,69.000000 -635.000000,109.000000 -588.000000L109.000000 -147.000000C109.000000 -44.000000,95.000000 -25.000000,12.000000 -19.000000L12.000000 -0.000000L247.000000 -0.000000L247.000000 -19.000000C170.000000 -23.000000,153.000000 -46.000000,153.000000 -147.000000L153.000000 -539.000000L595.000000 11.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_80">
      <path style="fill-rule: evenodd;" d="M202.000000 -291.000000C228.000000 -289.000000,245.000000 -288.000000,271.000000 -288.000000C349.000000 -288.000000,403.000000 -298.000000,446.000000 -322.000000C506.000000 -354.000000,542.000000 -415.000000,542.000000 -481.000000C542.000000 -523.000000,528.000000 -561.000000,501.000000 -590.000000C461.000000 -634.000000,374.000000 -662.000000,280.000000 -662.000000L16.000000 -662.000000L16.000000 -643.000000C90.000000 -635.000000,100.000000 -625.000000,100.000000 -553.000000L100.000000 -120.000000C100.000000 -36.000000,92.000000 -26.000000,16.000000 -19.000000L16.000000 -0.000000L296.000000 -0.000000L296.000000 -19.000000C217.000000 -22.000000,202.000000 -36.000000,202.000000 -109.000000M202.000000 -591.000000C202.000000 -618.000000,209.000000 -625.000000,236.000000 -625.000000C371.000000 -625.000000,433.000000 -578.000000,433.000000 -475.000000C433.000000 -378.000000,374.000000 -328.000000,259.000000 -328.000000C239.000000 -328.000000,225.000000 -329.000000,202.000000 -331.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_84">
      <path style="fill-rule: evenodd;" d="M254.000000 -620.000000L254.000000 -120.000000C254.000000 -35.000000,243.000000 -24.000000,160.000000 -19.000000L160.000000 -0.000000L452.000000 -0.000000L452.000000 -19.000000C370.000000 -23.000000,356.000000 -36.000000,356.000000 -109.000000L356.000000 -620.000000L410.000000 -620.000000C524.000000 -620.000000,546.000000 -602.000000,569.000000 -492.000000L593.000000 -492.000000L587.000000 -662.000000L23.000000 -662.000000L17.000000 -492.000000L41.000000 -492.000000C65.000000 -601.000000,88.000000 -620.000000,200.000000 -620.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_97">
      <path style="fill-rule: evenodd;" d="M442.000000 -66.000000C425.000000 -52.000000,413.000000 -47.000000,398.000000 -47.000000C375.000000 -47.000000,368.000000 -61.000000,368.000000 -105.000000L368.000000 -300.000000C368.000000 -352.000000,363.000000 -381.000000,348.000000 -405.000000C326.000000 -441.000000,283.000000 -460.000000,224.000000 -460.000000C130.000000 -460.000000,56.000000 -411.000000,56.000000 -348.000000C56.000000 -325.000000,76.000000 -305.000000,99.000000 -305.000000C123.000000 -305.000000,144.000000 -325.000000,144.000000 -347.000000C144.000000 -351.000000,143.000000 -356.000000,142.000000 -363.000000C140.000000 -372.000000,139.000000 -380.000000,139.000000 -387.000000C139.000000 -414.000000,171.000000 -436.000000,211.000000 -436.000000C260.000000 -436.000000,287.000000 -407.000000,287.000000 -353.000000L287.000000 -292.000000C133.000000 -230.000000,116.000000 -222.000000,73.000000 -184.000000C51.000000 -164.000000,37.000000 -130.000000,37.000000 -97.000000C37.000000 -34.000000,81.000000 10.000000,142.000000 10.000000C186.000000 10.000000,227.000000 -11.000000,288.000000 -63.000000C293.000000 -11.000000,311.000000 10.000000,352.000000 10.000000C386.000000 10.000000,407.000000 -2.000000,442.000000 -40.000000M287.000000 -123.000000C287.000000 -92.000000,282.000000 -83.000000,261.000000 -71.000000C237.000000 -57.000000,209.000000 -48.000000,188.000000 -48.000000C153.000000 -48.000000,125.000000 -82.000000,125.000000 -125.000000L125.000000 -129.000000C125.000000 -188.000000,166.000000 -224.000000,287.000000 -268.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_99">
      <path style="fill-rule: evenodd;" d="M398.000000 -156.000000C350.000000 -86.000000,314.000000 -62.000000,257.000000 -62.000000C166.000000 -62.000000,102.000000 -142.000000,102.000000 -257.000000C102.000000 -360.000000,157.000000 -431.000000,238.000000 -431.000000C274.000000 -431.000000,287.000000 -420.000000,297.000000 -383.000000L303.000000 -361.000000C311.000000 -333.000000,329.000000 -315.000000,350.000000 -315.000000C376.000000 -315.000000,398.000000 -334.000000,398.000000 -357.000000C398.000000 -413.000000,328.000000 -460.000000,244.000000 -460.000000C195.000000 -460.000000,144.000000 -440.000000,103.000000 -404.000000C53.000000 -360.000000,25.000000 -292.000000,25.000000 -213.000000C25.000000 -83.000000,104.000000 10.000000,215.000000 10.000000C260.000000 10.000000,300.000000 -6.000000,336.000000 -37.000000C363.000000 -61.000000,382.000000 -88.000000,412.000000 -147.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_101">
      <path style="fill-rule: evenodd;" d="M408.000000 -164.000000C360.000000 -88.000000,317.000000 -59.000000,253.000000 -59.000000C196.000000 -59.000000,153.000000 -88.000000,124.000000 -145.000000C106.000000 -183.000000,99.000000 -216.000000,97.000000 -277.000000L405.000000 -277.000000C397.000000 -342.000000,387.000000 -371.000000,362.000000 -403.000000C332.000000 -439.000000,286.000000 -460.000000,234.000000 -460.000000C184.000000 -460.000000,137.000000 -442.000000,99.000000 -408.000000C52.000000 -367.000000,25.000000 -296.000000,25.000000 -214.000000C25.000000 -76.000000,97.000000 10.000000,212.000000 10.000000C307.000000 10.000000,382.000000 -49.000000,424.000000 -157.000000M99.000000 -309.000000C110.000000 -387.000000,144.000000 -424.000000,205.000000 -424.000000C266.000000 -424.000000,290.000000 -396.000000,303.000000 -309.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_108">
      <path style="fill-rule: evenodd;" d="M19.000000 -623.000000L25.000000 -623.000000C36.000000 -624.000000,48.000000 -625.000000,56.000000 -625.000000C88.000000 -625.000000,98.000000 -611.000000,98.000000 -564.000000L98.000000 -87.000000C98.000000 -33.000000,84.000000 -20.000000,21.000000 -15.000000L21.000000 -0.000000L257.000000 -0.000000L257.000000 -15.000000C194.000000 -19.000000,182.000000 -29.000000,182.000000 -84.000000L182.000000 -681.000000L178.000000 -683.000000C126.000000 -666.000000,88.000000 -656.000000,19.000000 -639.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_114">
      <path style="fill-rule: evenodd;" d="M7.000000 -390.000000C21.000000 -393.000000,30.000000 -394.000000,42.000000 -394.000000C67.000000 -394.000000,76.000000 -378.000000,76.000000 -334.000000L76.000000 -84.000000C76.000000 -34.000000,69.000000 -27.000000,5.000000 -15.000000L5.000000 -0.000000L245.000000 -0.000000L245.000000 -15.000000C177.000000 -18.000000,160.000000 -33.000000,160.000000 -90.000000L160.000000 -315.000000C160.000000 -347.000000,203.000000 -397.000000,230.000000 -397.000000C236.000000 -397.000000,245.000000 -392.000000,256.000000 -382.000000C272.000000 -368.000000,283.000000 -362.000000,296.000000 -362.000000C320.000000 -362.000000,335.000000 -379.000000,335.000000 -407.000000C335.000000 -440.000000,314.000000 -460.000000,280.000000 -460.000000C238.000000 -460.000000,209.000000 -437.000000,160.000000 -366.000000L160.000000 -458.000000L155.000000 -460.000000C102.000000 -438.000000,66.000000 -425.000000,7.000000 -406.000000"></path>
    </g>
  </defs>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,287.590683 39.246094)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_114"></use>
    <use xlink:href="#GLYPHptmr8r_101" x="3.330012"></use>
    <use xlink:href="#GLYPHptmr8r_99" x="7.770022"></use>
    <use xlink:href="#GLYPHptmr8r_97" x="12.210033"></use>
    <use xlink:href="#GLYPHptmr8r_108" x="16.650043"></use>
    <use xlink:href="#GLYPHptmr8r_108" x="19.429987"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,327.421051 39.246094)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_61"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,366.086655 28.462357)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_84"></use>
    <use xlink:href="#GLYPHptmr8r_80" x="6.110078"></use>
  </g>
  <path d="M346.159698 35.260941L404.615906 35.260941" style="stroke:rgb(0.000000%,0.000000%,0.000000%); stroke-width: 0.637604;stroke-linejoin: round;stroke-miterlimit: 10.000000;fill: none;"></path>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,346.159698 50.180359)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_84"></use>
    <use xlink:href="#GLYPHptmr8r_80" x="6.110078"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,368.304092 50.180359)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_43"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,384.244324 50.180359)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_70"></use>
    <use xlink:href="#GLYPHptmr8r_78" x="5.560026"></use>
  </g>
</svg></span>
</p>
<p>A classifier with high recall but low precision finds most members of
positives (thus members of the class), but at the cost of
also classifying many negatives as member of the class.
A classifier with high precision but low recall is just the
opposite, classifying only few samples as positives, but most of these
predictions are correct.
An ideal classifier with high precision and high recall will classify
many samples as positive with a high accuracy.
</p>
<p>To represent this with a single number, we compute the F1-score,
the harmonic mean of precision and recall.
Thus, it is a measure of the classifier's accuracy.
</p>
<p><span title="3" class="displaymath"><!-- Created by MetaPost 1.902 on 2023.05.15:2033 --><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="45.4795em" height="4.46569em" viewBox="0 0 727.672058 71.450989">
<!-- Original BoundingBox: -363.836029 -35.725494 363.836029 35.725494 -->
  <defs>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_43">
      <path style="fill-rule: evenodd;" d="M409.000000 -230.000000L688.000000 -230.000000C702.000000 -230.000000,721.000000 -230.000000,721.000000 -250.000000C721.000000 -270.000000,702.000000 -270.000000,688.000000 -270.000000L409.000000 -270.000000L409.000000 -550.000000C409.000000 -564.000000,409.000000 -583.000000,389.000000 -583.000000C369.000000 -583.000000,369.000000 -564.000000,369.000000 -550.000000L369.000000 -270.000000L89.000000 -270.000000C75.000000 -270.000000,56.000000 -270.000000,56.000000 -250.000000C56.000000 -230.000000,75.000000 -230.000000,89.000000 -230.000000L369.000000 -230.000000L369.000000 50.000000C369.000000 64.000000,369.000000 83.000000,389.000000 83.000000C409.000000 83.000000,409.000000 64.000000,409.000000 50.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_50">
      <path style="fill-rule: evenodd;" d="M127.000000 -77.000000L233.000000 -180.000000C389.000000 -318.000000,449.000000 -372.000000,449.000000 -472.000000C449.000000 -586.000000,359.000000 -666.000000,237.000000 -666.000000C124.000000 -666.000000,50.000000 -574.000000,50.000000 -485.000000C50.000000 -429.000000,100.000000 -429.000000,103.000000 -429.000000C120.000000 -429.000000,155.000000 -441.000000,155.000000 -482.000000C155.000000 -508.000000,137.000000 -534.000000,102.000000 -534.000000C94.000000 -534.000000,92.000000 -534.000000,89.000000 -533.000000C112.000000 -598.000000,166.000000 -635.000000,224.000000 -635.000000C315.000000 -635.000000,358.000000 -554.000000,358.000000 -472.000000C358.000000 -392.000000,308.000000 -313.000000,253.000000 -251.000000L61.000000 -37.000000C50.000000 -26.000000,50.000000 -24.000000,50.000000 -0.000000L421.000000 -0.000000L449.000000 -174.000000L424.000000 -174.000000C419.000000 -144.000000,412.000000 -100.000000,402.000000 -85.000000C395.000000 -77.000000,329.000000 -77.000000,307.000000 -77.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmr10_61">
      <path style="fill-rule: evenodd;" d="M687.000000 -327.000000C702.000000 -327.000000,721.000000 -327.000000,721.000000 -347.000000C721.000000 -367.000000,702.000000 -367.000000,688.000000 -367.000000L89.000000 -367.000000C75.000000 -367.000000,56.000000 -367.000000,56.000000 -347.000000C56.000000 -327.000000,75.000000 -327.000000,90.000000 -327.000000M688.000000 -133.000000C702.000000 -133.000000,721.000000 -133.000000,721.000000 -153.000000C721.000000 -173.000000,702.000000 -173.000000,687.000000 -173.000000L90.000000 -173.000000C75.000000 -173.000000,56.000000 -173.000000,56.000000 -153.000000C56.000000 -133.000000,75.000000 -133.000000,89.000000 -133.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHcmsy10_3">
      <path style="fill-rule: evenodd;" d="M275.000000 -427.000000C276.000000 -441.000000,276.000000 -465.000000,250.000000 -465.000000C234.000000 -465.000000,221.000000 -452.000000,224.000000 -439.000000L224.000000 -426.000000L238.000000 -271.000000L110.000000 -364.000000C101.000000 -369.000000,99.000000 -371.000000,92.000000 -371.000000C78.000000 -371.000000,65.000000 -357.000000,65.000000 -343.000000C65.000000 -327.000000,75.000000 -323.000000,85.000000 -318.000000L227.000000 -250.000000L89.000000 -183.000000C73.000000 -175.000000,65.000000 -171.000000,65.000000 -156.000000C65.000000 -141.000000,78.000000 -128.000000,92.000000 -128.000000C99.000000 -128.000000,101.000000 -128.000000,126.000000 -147.000000L238.000000 -228.000000L223.000000 -60.000000C223.000000 -39.000000,241.000000 -34.000000,249.000000 -34.000000C261.000000 -34.000000,276.000000 -41.000000,276.000000 -60.000000L261.000000 -228.000000L389.000000 -135.000000C398.000000 -130.000000,400.000000 -128.000000,407.000000 -128.000000C421.000000 -128.000000,434.000000 -142.000000,434.000000 -156.000000C434.000000 -171.000000,425.000000 -176.000000,413.000000 -182.000000C353.000000 -212.000000,351.000000 -212.000000,272.000000 -249.000000L410.000000 -316.000000C426.000000 -324.000000,434.000000 -328.000000,434.000000 -343.000000C434.000000 -358.000000,421.000000 -371.000000,407.000000 -371.000000C400.000000 -371.000000,398.000000 -371.000000,373.000000 -352.000000L261.000000 -271.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_45">
      <path style="fill-rule: evenodd;" d="M39.000000 -257.000000L39.000000 -194.000000L285.000000 -194.000000L285.000000 -257.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_49">
      <path style="fill-rule: evenodd;" d="M291.000000 -676.000000L111.000000 -585.000000L111.000000 -571.000000C123.000000 -576.000000,134.000000 -580.000000,138.000000 -582.000000C156.000000 -589.000000,173.000000 -593.000000,183.000000 -593.000000C204.000000 -593.000000,213.000000 -578.000000,213.000000 -546.000000L213.000000 -93.000000C213.000000 -60.000000,205.000000 -37.000000,189.000000 -28.000000C174.000000 -19.000000,160.000000 -16.000000,118.000000 -15.000000L118.000000 -0.000000L394.000000 -0.000000L394.000000 -15.000000C315.000000 -16.000000,299.000000 -26.000000,299.000000 -74.000000L299.000000 -674.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_70">
      <path style="fill-rule: evenodd;" d="M479.000000 -231.000000L479.000000 -463.000000L456.000000 -463.000000C444.000000 -383.000000,426.000000 -368.000000,346.000000 -368.000000L201.000000 -368.000000L201.000000 -590.000000C201.000000 -618.000000,206.000000 -624.000000,233.000000 -624.000000L369.000000 -624.000000C482.000000 -624.000000,504.000000 -609.000000,521.000000 -519.000000L546.000000 -519.000000L543.000000 -662.000000L12.000000 -662.000000L12.000000 -643.000000C86.000000 -637.000000,99.000000 -623.000000,99.000000 -553.000000L99.000000 -120.000000C99.000000 -37.000000,88.000000 -24.000000,12.000000 -19.000000L12.000000 -0.000000L292.000000 -0.000000L292.000000 -19.000000C215.000000 -23.000000,201.000000 -37.000000,201.000000 -109.000000L201.000000 -327.000000L346.000000 -327.000000C427.000000 -327.000000,444.000000 -312.000000,456.000000 -231.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_97">
      <path style="fill-rule: evenodd;" d="M442.000000 -66.000000C425.000000 -52.000000,413.000000 -47.000000,398.000000 -47.000000C375.000000 -47.000000,368.000000 -61.000000,368.000000 -105.000000L368.000000 -300.000000C368.000000 -352.000000,363.000000 -381.000000,348.000000 -405.000000C326.000000 -441.000000,283.000000 -460.000000,224.000000 -460.000000C130.000000 -460.000000,56.000000 -411.000000,56.000000 -348.000000C56.000000 -325.000000,76.000000 -305.000000,99.000000 -305.000000C123.000000 -305.000000,144.000000 -325.000000,144.000000 -347.000000C144.000000 -351.000000,143.000000 -356.000000,142.000000 -363.000000C140.000000 -372.000000,139.000000 -380.000000,139.000000 -387.000000C139.000000 -414.000000,171.000000 -436.000000,211.000000 -436.000000C260.000000 -436.000000,287.000000 -407.000000,287.000000 -353.000000L287.000000 -292.000000C133.000000 -230.000000,116.000000 -222.000000,73.000000 -184.000000C51.000000 -164.000000,37.000000 -130.000000,37.000000 -97.000000C37.000000 -34.000000,81.000000 10.000000,142.000000 10.000000C186.000000 10.000000,227.000000 -11.000000,288.000000 -63.000000C293.000000 -11.000000,311.000000 10.000000,352.000000 10.000000C386.000000 10.000000,407.000000 -2.000000,442.000000 -40.000000M287.000000 -123.000000C287.000000 -92.000000,282.000000 -83.000000,261.000000 -71.000000C237.000000 -57.000000,209.000000 -48.000000,188.000000 -48.000000C153.000000 -48.000000,125.000000 -82.000000,125.000000 -125.000000L125.000000 -129.000000C125.000000 -188.000000,166.000000 -224.000000,287.000000 -268.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_99">
      <path style="fill-rule: evenodd;" d="M398.000000 -156.000000C350.000000 -86.000000,314.000000 -62.000000,257.000000 -62.000000C166.000000 -62.000000,102.000000 -142.000000,102.000000 -257.000000C102.000000 -360.000000,157.000000 -431.000000,238.000000 -431.000000C274.000000 -431.000000,287.000000 -420.000000,297.000000 -383.000000L303.000000 -361.000000C311.000000 -333.000000,329.000000 -315.000000,350.000000 -315.000000C376.000000 -315.000000,398.000000 -334.000000,398.000000 -357.000000C398.000000 -413.000000,328.000000 -460.000000,244.000000 -460.000000C195.000000 -460.000000,144.000000 -440.000000,103.000000 -404.000000C53.000000 -360.000000,25.000000 -292.000000,25.000000 -213.000000C25.000000 -83.000000,104.000000 10.000000,215.000000 10.000000C260.000000 10.000000,300.000000 -6.000000,336.000000 -37.000000C363.000000 -61.000000,382.000000 -88.000000,412.000000 -147.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_101">
      <path style="fill-rule: evenodd;" d="M408.000000 -164.000000C360.000000 -88.000000,317.000000 -59.000000,253.000000 -59.000000C196.000000 -59.000000,153.000000 -88.000000,124.000000 -145.000000C106.000000 -183.000000,99.000000 -216.000000,97.000000 -277.000000L405.000000 -277.000000C397.000000 -342.000000,387.000000 -371.000000,362.000000 -403.000000C332.000000 -439.000000,286.000000 -460.000000,234.000000 -460.000000C184.000000 -460.000000,137.000000 -442.000000,99.000000 -408.000000C52.000000 -367.000000,25.000000 -296.000000,25.000000 -214.000000C25.000000 -76.000000,97.000000 10.000000,212.000000 10.000000C307.000000 10.000000,382.000000 -49.000000,424.000000 -157.000000M99.000000 -309.000000C110.000000 -387.000000,144.000000 -424.000000,205.000000 -424.000000C266.000000 -424.000000,290.000000 -396.000000,303.000000 -309.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_105">
      <path style="fill-rule: evenodd;" d="M175.000000 -460.000000L20.000000 -405.000000L20.000000 -390.000000L28.000000 -391.000000C40.000000 -393.000000,53.000000 -394.000000,62.000000 -394.000000C86.000000 -394.000000,95.000000 -378.000000,95.000000 -334.000000L95.000000 -102.000000C95.000000 -30.000000,85.000000 -19.000000,16.000000 -15.000000L16.000000 -0.000000L253.000000 -0.000000L253.000000 -15.000000C187.000000 -20.000000,179.000000 -30.000000,179.000000 -102.000000L179.000000 -457.000000M128.000000 -683.000000C101.000000 -683.000000,78.000000 -660.000000,78.000000 -632.000000C78.000000 -604.000000,100.000000 -581.000000,128.000000 -581.000000C157.000000 -581.000000,180.000000 -603.000000,180.000000 -632.000000C180.000000 -660.000000,157.000000 -683.000000,128.000000 -683.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_108">
      <path style="fill-rule: evenodd;" d="M19.000000 -623.000000L25.000000 -623.000000C36.000000 -624.000000,48.000000 -625.000000,56.000000 -625.000000C88.000000 -625.000000,98.000000 -611.000000,98.000000 -564.000000L98.000000 -87.000000C98.000000 -33.000000,84.000000 -20.000000,21.000000 -15.000000L21.000000 -0.000000L257.000000 -0.000000L257.000000 -15.000000C194.000000 -19.000000,182.000000 -29.000000,182.000000 -84.000000L182.000000 -681.000000L178.000000 -683.000000C126.000000 -666.000000,88.000000 -656.000000,19.000000 -639.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_110">
      <path style="fill-rule: evenodd;" d="M16.000000 -398.000000C22.000000 -401.000000,32.000000 -402.000000,43.000000 -402.000000C71.000000 -402.000000,80.000000 -387.000000,80.000000 -338.000000L80.000000 -90.000000C80.000000 -33.000000,69.000000 -19.000000,18.000000 -15.000000L18.000000 -0.000000L230.000000 -0.000000L230.000000 -15.000000C179.000000 -19.000000,164.000000 -31.000000,164.000000 -67.000000L164.000000 -348.000000C212.000000 -393.000000,234.000000 -405.000000,267.000000 -405.000000C316.000000 -405.000000,340.000000 -374.000000,340.000000 -308.000000L340.000000 -99.000000C340.000000 -36.000000,327.000000 -19.000000,277.000000 -15.000000L277.000000 -0.000000L485.000000 -0.000000L485.000000 -15.000000C436.000000 -20.000000,424.000000 -32.000000,424.000000 -81.000000L424.000000 -310.000000C424.000000 -404.000000,380.000000 -460.000000,306.000000 -460.000000C260.000000 -460.000000,229.000000 -443.000000,161.000000 -379.000000L161.000000 -458.000000L154.000000 -460.000000C105.000000 -442.000000,71.000000 -431.000000,16.000000 -415.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_111">
      <path style="fill-rule: evenodd;" d="M250.000000 -460.000000C120.000000 -460.000000,29.000000 -364.000000,29.000000 -226.000000C29.000000 -91.000000,122.000000 10.000000,248.000000 10.000000C374.000000 10.000000,470.000000 -96.000000,470.000000 -234.000000C470.000000 -365.000000,378.000000 -460.000000,250.000000 -460.000000M237.000000 -432.000000C321.000000 -432.000000,380.000000 -336.000000,380.000000 -199.000000C380.000000 -86.000000,335.000000 -18.000000,260.000000 -18.000000C221.000000 -18.000000,184.000000 -42.000000,163.000000 -82.000000C135.000000 -134.000000,119.000000 -204.000000,119.000000 -275.000000C119.000000 -370.000000,166.000000 -432.000000,237.000000 -432.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_112">
      <path style="fill-rule: evenodd;" d="M9.000000 -393.000000C18.000000 -394.000000,25.000000 -394.000000,34.000000 -394.000000C68.000000 -394.000000,75.000000 -384.000000,75.000000 -337.000000L75.000000 131.000000C75.000000 183.000000,64.000000 194.000000,5.000000 200.000000L5.000000 217.000000L247.000000 217.000000L247.000000 199.000000C172.000000 198.000000,159.000000 187.000000,159.000000 124.000000L159.000000 -33.000000C194.000000 -0.000000,218.000000 10.000000,260.000000 10.000000C378.000000 10.000000,470.000000 -102.000000,470.000000 -247.000000C470.000000 -371.000000,400.000000 -460.000000,303.000000 -460.000000C247.000000 -460.000000,203.000000 -435.000000,159.000000 -381.000000L159.000000 -458.000000L153.000000 -460.000000C99.000000 -439.000000,64.000000 -426.000000,9.000000 -409.000000M159.000000 -334.000000C159.000000 -364.000000,215.000000 -400.000000,261.000000 -400.000000C335.000000 -400.000000,384.000000 -324.000000,384.000000 -208.000000C384.000000 -97.000000,335.000000 -22.000000,263.000000 -22.000000C216.000000 -22.000000,159.000000 -58.000000,159.000000 -88.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_114">
      <path style="fill-rule: evenodd;" d="M7.000000 -390.000000C21.000000 -393.000000,30.000000 -394.000000,42.000000 -394.000000C67.000000 -394.000000,76.000000 -378.000000,76.000000 -334.000000L76.000000 -84.000000C76.000000 -34.000000,69.000000 -27.000000,5.000000 -15.000000L5.000000 -0.000000L245.000000 -0.000000L245.000000 -15.000000C177.000000 -18.000000,160.000000 -33.000000,160.000000 -90.000000L160.000000 -315.000000C160.000000 -347.000000,203.000000 -397.000000,230.000000 -397.000000C236.000000 -397.000000,245.000000 -392.000000,256.000000 -382.000000C272.000000 -368.000000,283.000000 -362.000000,296.000000 -362.000000C320.000000 -362.000000,335.000000 -379.000000,335.000000 -407.000000C335.000000 -440.000000,314.000000 -460.000000,280.000000 -460.000000C238.000000 -460.000000,209.000000 -437.000000,160.000000 -366.000000L160.000000 -458.000000L155.000000 -460.000000C102.000000 -438.000000,66.000000 -425.000000,7.000000 -406.000000"></path>
    </g>
    <g transform="scale(0.009963,0.009963)" id="GLYPHptmr8r_115">
      <path style="fill-rule: evenodd;" d="M315.000000 -314.000000L311.000000 -450.000000L300.000000 -450.000000L298.000000 -448.000000C289.000000 -441.000000,288.000000 -440.000000,284.000000 -440.000000C278.000000 -440.000000,268.000000 -442.000000,257.000000 -447.000000C235.000000 -455.000000,213.000000 -459.000000,187.000000 -459.000000C108.000000 -459.000000,51.000000 -408.000000,51.000000 -336.000000C51.000000 -280.000000,83.000000 -240.000000,168.000000 -192.000000L226.000000 -159.000000C261.000000 -139.000000,278.000000 -115.000000,278.000000 -84.000000C278.000000 -40.000000,246.000000 -12.000000,195.000000 -12.000000C161.000000 -12.000000,130.000000 -25.000000,111.000000 -47.000000C90.000000 -72.000000,81.000000 -95.000000,68.000000 -152.000000L52.000000 -152.000000L52.000000 4.000000L65.000000 4.000000C72.000000 -6.000000,76.000000 -8.000000,88.000000 -8.000000C97.000000 -8.000000,111.000000 -6.000000,134.000000 -0.000000C162.000000 6.000000,189.000000 10.000000,207.000000 10.000000C284.000000 10.000000,348.000000 -48.000000,348.000000 -118.000000C348.000000 -168.000000,324.000000 -201.000000,264.000000 -237.000000L156.000000 -301.000000C128.000000 -317.000000,113.000000 -342.000000,113.000000 -369.000000C113.000000 -409.000000,144.000000 -437.000000,190.000000 -437.000000C247.000000 -437.000000,277.000000 -403.000000,300.000000 -314.000000"></path>
    </g>
  </defs>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,238.459747 39.399918)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_70"></use>
    <use xlink:href="#GLYPHptmr8r_49" x="5.560026"></use>
    <use xlink:href="#GLYPHptmr8r_45" x="10.560106"></use>
    <use xlink:href="#GLYPHptmr8r_115" x="13.890117"></use>
    <use xlink:href="#GLYPHptmr8r_99" x="17.780075"></use>
    <use xlink:href="#GLYPHptmr8r_111" x="22.220086"></use>
    <use xlink:href="#GLYPHptmr8r_114" x="27.220165"></use>
    <use xlink:href="#GLYPHptmr8r_101" x="30.550177"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,298.662064 39.399918)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_61"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,315.487732 39.399918)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_50"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,327.000107 39.399918)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmsy10_3"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,342.639343 28.616211)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_112"></use>
    <use xlink:href="#GLYPHptmr8r_114" x="5.000079"></use>
    <use xlink:href="#GLYPHptmr8r_101" x="8.330091"></use>
    <use xlink:href="#GLYPHptmr8r_99" x="12.770102"></use>
    <use xlink:href="#GLYPHptmr8r_105" x="17.210112"></use>
    <use xlink:href="#GLYPHptmr8r_115" x="19.990056"></use>
    <use xlink:href="#GLYPHptmr8r_105" x="23.880014"></use>
    <use xlink:href="#GLYPHptmr8r_111" x="26.659958"></use>
    <use xlink:href="#GLYPHptmr8r_110" x="31.660038"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,404.617828 28.616211)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmsy10_3"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,416.130203 28.616211)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_114"></use>
    <use xlink:href="#GLYPHptmr8r_101" x="3.330012"></use>
    <use xlink:href="#GLYPHptmr8r_99" x="7.770022"></use>
    <use xlink:href="#GLYPHptmr8r_97" x="12.210033"></use>
    <use xlink:href="#GLYPHptmr8r_108" x="16.650043"></use>
    <use xlink:href="#GLYPHptmr8r_108" x="19.429987"></use>
  </g>
  <path d="M340.425430 35.414795L453.746826 35.414795" style="stroke:rgb(0.000000%,0.000000%,0.000000%); stroke-width: 0.637604;stroke-linejoin: round;stroke-miterlimit: 10.000000;fill: none;"></path>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,340.425430 50.334213)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_112"></use>
    <use xlink:href="#GLYPHptmr8r_114" x="5.000079"></use>
    <use xlink:href="#GLYPHptmr8r_101" x="8.330091"></use>
    <use xlink:href="#GLYPHptmr8r_99" x="12.770102"></use>
    <use xlink:href="#GLYPHptmr8r_105" x="17.210112"></use>
    <use xlink:href="#GLYPHptmr8r_115" x="19.990056"></use>
    <use xlink:href="#GLYPHptmr8r_105" x="23.880014"></use>
    <use xlink:href="#GLYPHptmr8r_111" x="26.659958"></use>
    <use xlink:href="#GLYPHptmr8r_110" x="31.660038"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,402.403915 50.334213)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHcmr10_43"></use>
  </g>
  <g transform="matrix(1.600006,-0.000000,-0.000000,1.600006,418.344131 50.334213)" style="fill: rgb(0.000000%,0.000000%,0.000000%);">
    <use xlink:href="#GLYPHptmr8r_114"></use>
    <use xlink:href="#GLYPHptmr8r_101" x="3.330012"></use>
    <use xlink:href="#GLYPHptmr8r_99" x="7.770022"></use>
    <use xlink:href="#GLYPHptmr8r_97" x="12.210033"></use>
    <use xlink:href="#GLYPHptmr8r_108" x="16.650043"></use>
    <use xlink:href="#GLYPHptmr8r_108" x="19.429987"></use>
  </g>
</svg></span>
</p>
<p>For the example from the confusion matrix shown in <a href="toc_deeplearning.html">Deep Learning</a>
we get for the class 'apple' the values
precision: 1.00 (= 68/(68+0+0)),
recall: 0.74 (= 68/(68+21+3)), and
F1-score: 0.85 (=2*(1.00*0.74)/(1.00+0.74)).
</p>
</dd>
</dl>
<hr>
<h4 id="section_list">List of Sections</h4>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
